package sing.rabbit.provider;

import org.junit.jupiter.api.Test;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import static sing.rabbit.common.configurations.SimpleConfiguration.SIMPLE_QUEUE_NAME;

/**
 * @author xing
 * @date 2022/9/7 19:52
 */
@SpringBootTest
public class test {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @Test
    public void send() {
        rabbitTemplate.convertAndSend(SIMPLE_QUEUE_NAME, new Message("Hello".getBytes()));
    }
}
